﻿<Window x:Class="ExtensibleDemoApp.EffectsWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ShaderEffectLibrary Sample" Height="756" Width="944" 
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" 
    Background="{DynamicResource BackgroundBrush}"
    xmlns:lcl="clr-namespace:ExtensibleDemoApp" 
    Foreground="#FF474747"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    >
	<Window.Resources> 			
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="TemplatesToConfigureEffects.xaml"/>
			</ResourceDictionary.MergedDictionaries> 
			
			<lcl:ContentTemplateSelector x:Key="contentSelector" /> 
	
			<SolidColorBrush x:Key="CheckBoxFillNormal" Color="#F4F4F4"/>
			<SolidColorBrush x:Key="CheckBoxStroke" Color="#8E8F8F"/>
			<SolidColorBrush x:Key="ExpanderBorderBrush" Color="#777777"/>
			<SolidColorBrush x:Key="CheckBoxBorder" Color="#777777"/>
			<SolidColorBrush x:Key="CheckBoxCheckedFill" Color="#FFDB8715"/>
			
			
			<SolidColorBrush x:Key="CheckBoxFill" Color="#595959"/>

			 
			<LinearGradientBrush x:Key="ListBoxItemSelectedBrush" EndPoint="0.5,1" StartPoint="0.5,.5">
				 
				<!-- <GradientStop Color="#FFDB8715" Offset="1"/>
				<GradientStop Color="#DDE9BA7F" Offset="1"/>
-->

					<GradientStop Color="#FFDB8715" Offset="0"/>
					<GradientStop Color="#FFDB8715" Offset="1"/>
					<!--<GradientStop Color="#DDE4D0B6" Offset="1"/>-->

				
			</LinearGradientBrush>
			
			<LinearGradientBrush x:Key="ListBoxMouseOverBackground" EndPoint="0.5,1" StartPoint="0.5,0">				
					<GradientStop Color="#FFFFFFFF" Offset="0"/>
					<GradientStop Color="#FFFFFFFF" Offset="1"/>
					<!--<GradientStop Color="#228E8F8F" Offset="1"/>-->
				 
				<!-- 
				<GradientStop Color="#88E98B14" Offset="0"/>
				<GradientStop Color="#DDE9BA7F" Offset="1"/>
				-->
			</LinearGradientBrush>



			<Style x:Key="EffectCheckBox" TargetType="{x:Type CheckBox}">
				<Setter Property="Template"> 
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type CheckBox}">							
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*"/>
										<ColumnDefinition Width="20" /> 
									</Grid.ColumnDefinitions>
									<!-- ContentPresenter displays content of CheckBox -->
									<ContentPresenter
                    Content="{TemplateBinding Content}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    Margin="{TemplateBinding Padding}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

									<!-- This Border displays the checked state -->
									<Border Margin="1" x:Name="checkedState" Background="{StaticResource CheckBoxFill}" CornerRadius="2" Grid.Column="1" BorderBrush="{StaticResource CheckBoxBorder}" BorderThickness="2"/>
								</Grid>
							
							<ControlTemplate.Triggers>
								<Trigger Property="IsChecked" Value="True">
									<Setter TargetName="checkedState" 
                        Property="Background" 
                        Value="{StaticResource CheckBoxCheckedFill}" />
								</Trigger>

								<Trigger Property="IsEnabled" Value="False">
									<Setter Property="Foreground" 
                        Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>					
			</Style> 
			
			 

			<DataTemplate x:Key="DataTemplateEffect">
				<Expander HorizontalAlignment="Left" VerticalAlignment="Top" 
				MinWidth="250" Style="{DynamicResource ExpanderStyle1}" BorderThickness="2,1,2,1" 
				BorderBrush="{StaticResource ExpanderBorderBrush}" >
					<Expander.Header>
						<CheckBox Content="{Binding Path=DisplayName}" IsChecked="{Binding Path=IsChecked}" Style="{StaticResource EffectCheckBox}" HorizontalAlignment="Stretch" MinWidth="250" FontSize="14" Foreground="#FFEFECE9" FontWeight="Bold"/>

					</Expander.Header>
					<Grid >
						<ContentControl Content="{Binding Path=Effect}" />
					</Grid>
				</Expander>
			</DataTemplate>
			<LinearGradientBrush x:Key="ExpanderArrowHoverFill" EndPoint="0,1" StartPoint="0,0">
				<GradientStop Color="#FFF0F8FE" Offset="0"/>
				<GradientStop Color="#FFE0F3FE" Offset="0.3"/>
				<GradientStop Color="#FF6FA7C5" Offset="1"/>
			</LinearGradientBrush>
			<LinearGradientBrush x:Key="ExpanderArrowPressedFill" EndPoint="0,1" StartPoint="0,0">
				<GradientStop Color="#FFDCF0FA" Offset="0"/>
				<GradientStop Color="#FFC5E6F7" Offset="0.2"/>
				<GradientStop Color="#FF5690D0" Offset="1"/>
			</LinearGradientBrush>
			<LinearGradientBrush x:Key="ExpanderArrowFill" EndPoint="0,1" StartPoint="0,0">
				<GradientStop Color="White" Offset="0"/>
				<GradientStop Color="#FFBFBFBF" Offset="0.5"/>
				<GradientStop Color="#FF878787" Offset="1"/>
			</LinearGradientBrush>
			<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ToggleButton}">
							<Border Padding="{TemplateBinding Padding}">
								<Grid SnapsToDevicePixels="False" Background="Transparent">
									<Grid.RowDefinitions>
										<RowDefinition Height="19"/>
										<RowDefinition Height="*"/>
									</Grid.RowDefinitions>
									<Grid>
										<Grid.LayoutTransform>
											<TransformGroup>
												<TransformGroup.Children>
													<TransformCollection>
														<RotateTransform Angle="-90"/>
													</TransformCollection>
												</TransformGroup.Children>
											</TransformGroup>
										</Grid.LayoutTransform>
										<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19"/>
										<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
									</Grid>
									<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsChecked" Value="true">
									<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
								</Trigger>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
									<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ToggleButton}">
							<Border Padding="{TemplateBinding Padding}">
								<Grid SnapsToDevicePixels="False" Background="Transparent">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="19"/>
										<ColumnDefinition Width="*"/>
									</Grid.ColumnDefinitions>
									<Grid>
										<Grid.LayoutTransform>
											<TransformGroup>
												<TransformGroup.Children>
													<TransformCollection>
														<RotateTransform Angle="180"/>
													</TransformCollection>
												</TransformGroup.Children>
											</TransformGroup>
										</Grid.LayoutTransform>
										<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19"/>
										<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
									</Grid>
									<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsChecked" Value="true">
									<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
								</Trigger>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
									<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ToggleButton}">
							<Border Padding="{TemplateBinding Padding}">
								<Grid SnapsToDevicePixels="False" Background="Transparent">
									<Grid.RowDefinitions>
										<RowDefinition Height="19"/>
										<RowDefinition Height="*"/>
									</Grid.RowDefinitions>
									<Grid>
										<Grid.LayoutTransform>
											<TransformGroup>
												<TransformGroup.Children>
													<TransformCollection>
														<RotateTransform Angle="90"/>
													</TransformCollection>
												</TransformGroup.Children>
											</TransformGroup>
										</Grid.LayoutTransform>
										<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19"/>
										<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
									</Grid>
									<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Row="1"/>
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsChecked" Value="true">
									<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
								</Trigger>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
									<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ExpanderHeaderFocusVisual">
				<Setter Property="Control.Template">
					<Setter.Value>
						<ControlTemplate>
							<Border>
								<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="0" SnapsToDevicePixels="true"/>
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ToggleButton}">
							<Border Padding="{TemplateBinding Padding}">
								<Grid SnapsToDevicePixels="False" Background="Transparent">
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="19"/>
										<ColumnDefinition Width="*"/>
									</Grid.ColumnDefinitions>
									<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19"/>
									<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5"/>
									<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" RecognizesAccessKey="True" Grid.Column="1"/>
								</Grid>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsChecked" Value="true">
									<Setter Property="Data" TargetName="arrow" Value="M 1,4.5  L 4.5,1  L 8,4.5"/>
								</Trigger>
								<Trigger Property="IsMouseOver" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#222"/>
								</Trigger>
								<Trigger Property="IsPressed" Value="true">
									<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B"/>
									<Setter Property="StrokeThickness" TargetName="circle" Value="1.5"/>
									<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}"/>
									<Setter Property="Stroke" TargetName="arrow" Value="#FF003366"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ExpanderStyle1" TargetType="{x:Type Expander}">
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
				<Setter Property="VerticalContentAlignment" Value="Stretch"/>
				<Setter Property="BorderBrush" Value="Transparent"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type Expander}">
							<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
								<DockPanel>
									<ToggleButton FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{StaticResource ExpanderDownHeaderStyle}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top"/>
									<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false" Visibility="Collapsed" DockPanel.Dock="Bottom"/>
								</DockPanel>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsExpanded" Value="true">
									<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
								</Trigger>
								<Trigger Property="ExpandDirection" Value="Right">
									<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Right"/>
									<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Left"/>
									<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderRightHeaderStyle}"/>
								</Trigger>
								<Trigger Property="ExpandDirection" Value="Up">
									<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Top"/>
									<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Bottom"/>
									<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderUpHeaderStyle}"/>
								</Trigger>
								<Trigger Property="ExpandDirection" Value="Left">
									<Setter Property="DockPanel.Dock" TargetName="ExpandSite" Value="Left"/>
									<Setter Property="DockPanel.Dock" TargetName="HeaderSite" Value="Right"/>
									<Setter Property="Style" TargetName="HeaderSite" Value="{StaticResource ExpanderLeftHeaderStyle}"/>
								</Trigger>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>


			<DataTemplate x:Key="mediaChoiceTemplate" >
				<TextBlock TextWrapping="Wrap" Text="{Binding Path=DisplayName}" Margin="10,0,10,0" FontSize="16" FontWeight="Normal" />
			</DataTemplate>
			<SolidColorBrush x:Key="ListBorder" Color="#828790"/>
			<Style x:Key="ListBoxStyle1" TargetType="{x:Type ListBox}">
				<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
				<Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
				<Setter Property="BorderThickness" Value="1"/>
				<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
				<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
				<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
				<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
				<Setter Property="VerticalContentAlignment" Value="Center"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBox}">
							<Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1">
								<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
									<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
								</ScrollViewer>
							</Border>
							<ControlTemplate.Triggers>
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
								</Trigger>
								<Trigger Property="IsGrouping" Value="true">
									<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
				<Setter Property="Background" Value="Transparent"/>
				<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
				<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
				<Setter Property="Padding" Value="2,0,0,0"/>
				<Setter Property="TextBlock.Foreground" Value="#FFFFFFFF" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ListBoxItem}">
							<Border x:Name="Bd" SnapsToDevicePixels="true" 
							Background="{TemplateBinding Background}" 
							BorderBrush="{TemplateBinding BorderBrush}" 
							BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
								<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
							</Border>
							<ControlTemplate.Triggers>
								<MultiTrigger>
									<MultiTrigger.Conditions>
										<Condition Property="IsMouseOver" Value="True"/>
										<Condition Property="Selector.IsSelected" Value="False"/>
									</MultiTrigger.Conditions>
									<Setter Property="Background" TargetName="Bd" Value="{DynamicResource ListBoxMouseOverBackground}"/>
									<Setter Property="TextBlock.Foreground" Value="#FF595959" /> 
								</MultiTrigger>
								<Trigger Property="IsSelected" Value="true">									
									<Setter Property="Background" TargetName="Bd" Value="{StaticResource ListBoxItemSelectedBrush}" />
									<Setter Property="TextBlock.Foreground" Value="#FFFFFFFF" />
										  
								</Trigger>
								<!-- <MultiTrigger>
									<MultiTrigger.Conditions>
										<Condition Property="IsSelected" Value="true"/>
										<Condition Property="Selector.IsSelectionActive" Value="false"/>
									</MultiTrigger.Conditions>
									<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
								</MultiTrigger> --> 
								<Trigger Property="IsEnabled" Value="false">
									<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
								</Trigger>
							</ControlTemplate.Triggers>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>			 	
		</ResourceDictionary> 
	</Window.Resources>
		<Grid lcl:DesignTimeData.DesignTimeModel="ViewModel"		>		
			<Grid.RowDefinitions>
				<RowDefinition Height="40"/>
				<RowDefinition Height="*"/>				 
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="8"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>

		<ScrollViewer Grid.Row="1" Grid.RowSpan="2" VerticalScrollBarVisibility="Auto" Margin="0,0,0,6">
			<StackPanel>
			<ItemsControl Margin="1" Grid.Row="0" ItemsSource="{Binding Path=Effects}" ItemTemplate="{StaticResource DataTemplateEffect}"   MinWidth="260"/>			 
			<Button Content="Show Transition Effects Slideshow" 
				Width="180" Margin="0,10,0,0" 
				Command="{x:Static lcl:AppCommands.ShowTransitionsWindow}" /> 
			</StackPanel> 
		</ScrollViewer>


		<Border VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="0" Grid.ColumnSpan="3" 
			BorderBrush="{StaticResource CheckBoxBorder}" CornerRadius="5" BorderThickness="2">
			<ListBox x:Name="contentTypes" 
				ItemsSource="{Binding Path=ContentTypes}" 
				
				ItemTemplate="{StaticResource mediaChoiceTemplate}" 
				ItemContainerStyle="{DynamicResource ListBoxItemStyle1}" 
				 Style="{DynamicResource ListBoxStyle1}" 
				
				BorderBrush="Transparent"
				Background="#00FFFFFF" >
				<ListBox.ItemsPanel>
					<ItemsPanelTemplate>
						<StackPanel Orientation="Horizontal"/>
					</ItemsPanelTemplate>
				</ListBox.ItemsPanel>
			</ListBox>
		</Border> 

		<!--<GridSplitter  Width="8" Grid.RowSpan="1" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,6"/>-->
			<Viewbox Grid.Column="2" Grid.Row="1" VerticalAlignment="Top" HorizontalAlignment="Stretch" StretchDirection="Both" Margin="0,0,0,0" d:LayoutOverrides="GridBox" Stretch="Uniform" > 
			<Border HorizontalAlignment="Stretch" MinWidth="300" MinHeight="300" Height="Auto" VerticalAlignment="Center" Width="Auto" x:Name="ParentPlaceHolder" BorderBrush="#FF808080" BorderThickness="2">
				<Border x:Name="ContentPlaceHolder" >
					<ContentControl 					
					ContentTemplateSelector="{StaticResource contentSelector}"
					Content="{Binding ElementName=contentTypes, Path=SelectedItem}">
					
					</ContentControl>
				</Border>
			</Border>
		</Viewbox>
			<!--<ListBoxItem HorizontalAlignment="Left"  MinWidth="100" MinHeight="30" 
			Grid.Row="0" Grid.Column="2" VerticalAlignment="Top" Content="ListBoxItem" Style="{DynamicResource ListBoxItemStyle1}" Visibility="Collapsed" />-->
			<Button HorizontalAlignment="Right" Margin="0,11.64,6,0" Width="72" 
			Content="Save" Grid.Column="2" 
			x:Name="btnSave" VerticalAlignment="Top" 
			Command="{x:Static lcl:AppCommands.RTBCommand}" CommandParameter="{Binding ElementName=ParentPlaceHolder}"
			/>        
    </Grid>
</Window>
